/**
 * <copyright>
 * </copyright>
 *

 */
package hu.bme.mit.androtext.androgui.androGuiDsl.impl;

import hu.bme.mit.androtext.androgui.androGuiDsl.AbsoluteLayout;
import hu.bme.mit.androtext.androgui.androGuiDsl.AndroGuiDslFactory;
import hu.bme.mit.androtext.androgui.androGuiDsl.AndroGuiDslPackage;
import hu.bme.mit.androtext.androgui.androGuiDsl.AndroGuiModelRoot;
import hu.bme.mit.androtext.androgui.androGuiDsl.BaseLayout;
import hu.bme.mit.androtext.androgui.androGuiDsl.Button;
import hu.bme.mit.androtext.androgui.androGuiDsl.CheckBox;
import hu.bme.mit.androtext.androgui.androGuiDsl.EditText;
import hu.bme.mit.androtext.androgui.androGuiDsl.FrameLayout;
import hu.bme.mit.androtext.androgui.androGuiDsl.Layout;
import hu.bme.mit.androtext.androgui.androGuiDsl.LayoutStyle;
import hu.bme.mit.androtext.androgui.androGuiDsl.LinearLayout;
import hu.bme.mit.androtext.androgui.androGuiDsl.ListView;
import hu.bme.mit.androtext.androgui.androGuiDsl.PreferenceScreen;
import hu.bme.mit.androtext.androgui.androGuiDsl.RadioButton;
import hu.bme.mit.androtext.androgui.androGuiDsl.RadioGroup;
import hu.bme.mit.androtext.androgui.androGuiDsl.RatingBar;
import hu.bme.mit.androtext.androgui.androGuiDsl.RelativeLayout;
import hu.bme.mit.androtext.androgui.androGuiDsl.RootLayout;
import hu.bme.mit.androtext.androgui.androGuiDsl.Spinner;
import hu.bme.mit.androtext.androgui.androGuiDsl.TextView;
import hu.bme.mit.androtext.androgui.androGuiDsl.ToggleButton;
import hu.bme.mit.androtext.androgui.androGuiDsl.UIElement;
import hu.bme.mit.androtext.androgui.androGuiDsl.Widget;

import hu.bme.mit.androtext.androres.androResDsl.AndroResDslPackage;

import hu.bme.mit.androtext.common.commons.CommonsPackage;

import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EEnum;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.EReference;

import org.eclipse.emf.ecore.impl.EPackageImpl;

/**
 * <!-- begin-user-doc -->
 * An implementation of the model <b>Package</b>.
 * <!-- end-user-doc -->
 * @generated
 */
public class AndroGuiDslPackageImpl extends EPackageImpl implements AndroGuiDslPackage
{
  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  private EClass androGuiModelRootEClass = null;

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  private EClass uiElementEClass = null;

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  private EClass layoutEClass = null;

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  private EClass rootLayoutEClass = null;

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  private EClass baseLayoutEClass = null;

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  private EClass absoluteLayoutEClass = null;

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  private EClass linearLayoutEClass = null;

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  private EClass frameLayoutEClass = null;

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  private EClass relativeLayoutEClass = null;

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  private EClass widgetEClass = null;

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  private EClass textViewEClass = null;

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  private EClass editTextEClass = null;

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  private EClass buttonEClass = null;

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  private EClass listViewEClass = null;

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  private EClass spinnerEClass = null;

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  private EClass checkBoxEClass = null;

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  private EClass radioGroupEClass = null;

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  private EClass ratingBarEClass = null;

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  private EClass toggleButtonEClass = null;

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  private EClass radioButtonEClass = null;

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  private EClass preferenceScreenEClass = null;

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  private EEnum layoutStyleEEnum = null;

  /**
   * Creates an instance of the model <b>Package</b>, registered with
   * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
   * package URI value.
   * <p>Note: the correct way to create the package is via the static
   * factory method {@link #init init()}, which also performs
   * initialization of the package, or returns the registered package,
   * if one already exists.
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @see org.eclipse.emf.ecore.EPackage.Registry
   * @see hu.bme.mit.androtext.androgui.androGuiDsl.AndroGuiDslPackage#eNS_URI
   * @see #init()
   * @generated
   */
  private AndroGuiDslPackageImpl()
  {
    super(eNS_URI, AndroGuiDslFactory.eINSTANCE);
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  private static boolean isInited = false;

  /**
   * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
   * 
   * <p>This method is used to initialize {@link AndroGuiDslPackage#eINSTANCE} when that field is accessed.
   * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @see #eNS_URI
   * @see #createPackageContents()
   * @see #initializePackageContents()
   * @generated
   */
  public static AndroGuiDslPackage init()
  {
    if (isInited) return (AndroGuiDslPackage)EPackage.Registry.INSTANCE.getEPackage(AndroGuiDslPackage.eNS_URI);

    // Obtain or create and register package
    AndroGuiDslPackageImpl theAndroGuiDslPackage = (AndroGuiDslPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof AndroGuiDslPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new AndroGuiDslPackageImpl());

    isInited = true;

    // Initialize simple dependencies
    AndroResDslPackage.eINSTANCE.eClass();

    // Create package meta-data objects
    theAndroGuiDslPackage.createPackageContents();

    // Initialize created meta-data
    theAndroGuiDslPackage.initializePackageContents();

    // Mark meta-data to indicate it can't be changed
    theAndroGuiDslPackage.freeze();

  
    // Update the registry and return the package
    EPackage.Registry.INSTANCE.put(AndroGuiDslPackage.eNS_URI, theAndroGuiDslPackage);
    return theAndroGuiDslPackage;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public EClass getAndroGuiModelRoot()
  {
    return androGuiModelRootEClass;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public EAttribute getAndroGuiModelRoot_Name()
  {
    return (EAttribute)androGuiModelRootEClass.getEStructuralFeatures().get(0);
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public EReference getAndroGuiModelRoot_Imports()
  {
    return (EReference)androGuiModelRootEClass.getEStructuralFeatures().get(1);
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public EReference getAndroGuiModelRoot_RootLayout()
  {
    return (EReference)androGuiModelRootEClass.getEStructuralFeatures().get(2);
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public EClass getUIElement()
  {
    return uiElementEClass;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public EClass getLayout()
  {
    return layoutEClass;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public EClass getRootLayout()
  {
    return rootLayoutEClass;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public EAttribute getRootLayout_Name()
  {
    return (EAttribute)rootLayoutEClass.getEStructuralFeatures().get(0);
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public EClass getBaseLayout()
  {
    return baseLayoutEClass;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public EAttribute getBaseLayout_LayoutStyle()
  {
    return (EAttribute)baseLayoutEClass.getEStructuralFeatures().get(0);
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public EReference getBaseLayout_Elements()
  {
    return (EReference)baseLayoutEClass.getEStructuralFeatures().get(1);
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public EClass getAbsoluteLayout()
  {
    return absoluteLayoutEClass;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public EClass getLinearLayout()
  {
    return linearLayoutEClass;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public EAttribute getLinearLayout_Orientation()
  {
    return (EAttribute)linearLayoutEClass.getEStructuralFeatures().get(0);
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public EClass getFrameLayout()
  {
    return frameLayoutEClass;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public EClass getRelativeLayout()
  {
    return relativeLayoutEClass;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public EClass getWidget()
  {
    return widgetEClass;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public EAttribute getWidget_Name()
  {
    return (EAttribute)widgetEClass.getEStructuralFeatures().get(0);
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public EAttribute getWidget_LayoutStyle()
  {
    return (EAttribute)widgetEClass.getEStructuralFeatures().get(1);
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public EClass getTextView()
  {
    return textViewEClass;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public EAttribute getTextView_Text()
  {
    return (EAttribute)textViewEClass.getEStructuralFeatures().get(0);
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public EClass getEditText()
  {
    return editTextEClass;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public EAttribute getEditText_Text()
  {
    return (EAttribute)editTextEClass.getEStructuralFeatures().get(0);
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public EClass getButton()
  {
    return buttonEClass;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public EAttribute getButton_Text()
  {
    return (EAttribute)buttonEClass.getEStructuralFeatures().get(0);
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public EClass getListView()
  {
    return listViewEClass;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public EReference getListView_Entries()
  {
    return (EReference)listViewEClass.getEStructuralFeatures().get(0);
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public EReference getListView_Layout()
  {
    return (EReference)listViewEClass.getEStructuralFeatures().get(1);
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public EClass getSpinner()
  {
    return spinnerEClass;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public EClass getCheckBox()
  {
    return checkBoxEClass;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public EAttribute getCheckBox_Text()
  {
    return (EAttribute)checkBoxEClass.getEStructuralFeatures().get(0);
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public EReference getCheckBox_Entries()
  {
    return (EReference)checkBoxEClass.getEStructuralFeatures().get(1);
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public EClass getRadioGroup()
  {
    return radioGroupEClass;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public EAttribute getRadioGroup_Orientation()
  {
    return (EAttribute)radioGroupEClass.getEStructuralFeatures().get(0);
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public EReference getRadioGroup_Radiobuttons()
  {
    return (EReference)radioGroupEClass.getEStructuralFeatures().get(1);
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public EClass getRatingBar()
  {
    return ratingBarEClass;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public EAttribute getRatingBar_NumStars()
  {
    return (EAttribute)ratingBarEClass.getEStructuralFeatures().get(0);
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public EClass getToggleButton()
  {
    return toggleButtonEClass;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public EAttribute getToggleButton_TextOn()
  {
    return (EAttribute)toggleButtonEClass.getEStructuralFeatures().get(0);
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public EAttribute getToggleButton_TextOff()
  {
    return (EAttribute)toggleButtonEClass.getEStructuralFeatures().get(1);
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public EClass getRadioButton()
  {
    return radioButtonEClass;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public EAttribute getRadioButton_Name()
  {
    return (EAttribute)radioButtonEClass.getEStructuralFeatures().get(0);
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public EAttribute getRadioButton_Text()
  {
    return (EAttribute)radioButtonEClass.getEStructuralFeatures().get(1);
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public EAttribute getRadioButton_LayoutStyle()
  {
    return (EAttribute)radioButtonEClass.getEStructuralFeatures().get(2);
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public EClass getPreferenceScreen()
  {
    return preferenceScreenEClass;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public EAttribute getPreferenceScreen_Title()
  {
    return (EAttribute)preferenceScreenEClass.getEStructuralFeatures().get(0);
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public EEnum getLayoutStyle()
  {
    return layoutStyleEEnum;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public AndroGuiDslFactory getAndroGuiDslFactory()
  {
    return (AndroGuiDslFactory)getEFactoryInstance();
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  private boolean isCreated = false;

  /**
   * Creates the meta-model objects for the package.  This method is
   * guarded to have no affect on any invocation but its first.
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public void createPackageContents()
  {
    if (isCreated) return;
    isCreated = true;

    // Create classes and their features
    androGuiModelRootEClass = createEClass(ANDRO_GUI_MODEL_ROOT);
    createEAttribute(androGuiModelRootEClass, ANDRO_GUI_MODEL_ROOT__NAME);
    createEReference(androGuiModelRootEClass, ANDRO_GUI_MODEL_ROOT__IMPORTS);
    createEReference(androGuiModelRootEClass, ANDRO_GUI_MODEL_ROOT__ROOT_LAYOUT);

    uiElementEClass = createEClass(UI_ELEMENT);

    layoutEClass = createEClass(LAYOUT);

    rootLayoutEClass = createEClass(ROOT_LAYOUT);
    createEAttribute(rootLayoutEClass, ROOT_LAYOUT__NAME);

    baseLayoutEClass = createEClass(BASE_LAYOUT);
    createEAttribute(baseLayoutEClass, BASE_LAYOUT__LAYOUT_STYLE);
    createEReference(baseLayoutEClass, BASE_LAYOUT__ELEMENTS);

    absoluteLayoutEClass = createEClass(ABSOLUTE_LAYOUT);

    linearLayoutEClass = createEClass(LINEAR_LAYOUT);
    createEAttribute(linearLayoutEClass, LINEAR_LAYOUT__ORIENTATION);

    frameLayoutEClass = createEClass(FRAME_LAYOUT);

    relativeLayoutEClass = createEClass(RELATIVE_LAYOUT);

    widgetEClass = createEClass(WIDGET);
    createEAttribute(widgetEClass, WIDGET__NAME);
    createEAttribute(widgetEClass, WIDGET__LAYOUT_STYLE);

    textViewEClass = createEClass(TEXT_VIEW);
    createEAttribute(textViewEClass, TEXT_VIEW__TEXT);

    editTextEClass = createEClass(EDIT_TEXT);
    createEAttribute(editTextEClass, EDIT_TEXT__TEXT);

    buttonEClass = createEClass(BUTTON);
    createEAttribute(buttonEClass, BUTTON__TEXT);

    listViewEClass = createEClass(LIST_VIEW);
    createEReference(listViewEClass, LIST_VIEW__ENTRIES);
    createEReference(listViewEClass, LIST_VIEW__LAYOUT);

    spinnerEClass = createEClass(SPINNER);

    checkBoxEClass = createEClass(CHECK_BOX);
    createEAttribute(checkBoxEClass, CHECK_BOX__TEXT);
    createEReference(checkBoxEClass, CHECK_BOX__ENTRIES);

    radioGroupEClass = createEClass(RADIO_GROUP);
    createEAttribute(radioGroupEClass, RADIO_GROUP__ORIENTATION);
    createEReference(radioGroupEClass, RADIO_GROUP__RADIOBUTTONS);

    ratingBarEClass = createEClass(RATING_BAR);
    createEAttribute(ratingBarEClass, RATING_BAR__NUM_STARS);

    toggleButtonEClass = createEClass(TOGGLE_BUTTON);
    createEAttribute(toggleButtonEClass, TOGGLE_BUTTON__TEXT_ON);
    createEAttribute(toggleButtonEClass, TOGGLE_BUTTON__TEXT_OFF);

    radioButtonEClass = createEClass(RADIO_BUTTON);
    createEAttribute(radioButtonEClass, RADIO_BUTTON__NAME);
    createEAttribute(radioButtonEClass, RADIO_BUTTON__TEXT);
    createEAttribute(radioButtonEClass, RADIO_BUTTON__LAYOUT_STYLE);

    preferenceScreenEClass = createEClass(PREFERENCE_SCREEN);
    createEAttribute(preferenceScreenEClass, PREFERENCE_SCREEN__TITLE);

    // Create enums
    layoutStyleEEnum = createEEnum(LAYOUT_STYLE);
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  private boolean isInitialized = false;

  /**
   * Complete the initialization of the package and its meta-model.  This
   * method is guarded to have no affect on any invocation but its first.
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public void initializePackageContents()
  {
    if (isInitialized) return;
    isInitialized = true;

    // Initialize package
    setName(eNAME);
    setNsPrefix(eNS_PREFIX);
    setNsURI(eNS_URI);

    // Obtain other dependent packages
    CommonsPackage theCommonsPackage = (CommonsPackage)EPackage.Registry.INSTANCE.getEPackage(CommonsPackage.eNS_URI);
    AndroResDslPackage theAndroResDslPackage = (AndroResDslPackage)EPackage.Registry.INSTANCE.getEPackage(AndroResDslPackage.eNS_URI);

    // Create type parameters

    // Set bounds for type parameters

    // Add supertypes to classes
    layoutEClass.getESuperTypes().add(this.getUIElement());
    rootLayoutEClass.getESuperTypes().add(this.getLayout());
    baseLayoutEClass.getESuperTypes().add(this.getRootLayout());
    absoluteLayoutEClass.getESuperTypes().add(this.getBaseLayout());
    linearLayoutEClass.getESuperTypes().add(this.getBaseLayout());
    frameLayoutEClass.getESuperTypes().add(this.getBaseLayout());
    relativeLayoutEClass.getESuperTypes().add(this.getBaseLayout());
    widgetEClass.getESuperTypes().add(this.getUIElement());
    textViewEClass.getESuperTypes().add(this.getWidget());
    editTextEClass.getESuperTypes().add(this.getWidget());
    buttonEClass.getESuperTypes().add(this.getWidget());
    listViewEClass.getESuperTypes().add(this.getWidget());
    spinnerEClass.getESuperTypes().add(this.getWidget());
    checkBoxEClass.getESuperTypes().add(this.getWidget());
    radioGroupEClass.getESuperTypes().add(this.getWidget());
    ratingBarEClass.getESuperTypes().add(this.getWidget());
    toggleButtonEClass.getESuperTypes().add(this.getWidget());
    preferenceScreenEClass.getESuperTypes().add(this.getRootLayout());

    // Initialize classes and features; add operations and parameters
    initEClass(androGuiModelRootEClass, AndroGuiModelRoot.class, "AndroGuiModelRoot", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
    initEAttribute(getAndroGuiModelRoot_Name(), ecorePackage.getEString(), "name", null, 0, 1, AndroGuiModelRoot.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    initEReference(getAndroGuiModelRoot_Imports(), theCommonsPackage.getImport(), null, "imports", null, 0, -1, AndroGuiModelRoot.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    initEReference(getAndroGuiModelRoot_RootLayout(), this.getRootLayout(), null, "rootLayout", null, 0, -1, AndroGuiModelRoot.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

    initEClass(uiElementEClass, UIElement.class, "UIElement", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);

    initEClass(layoutEClass, Layout.class, "Layout", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);

    initEClass(rootLayoutEClass, RootLayout.class, "RootLayout", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
    initEAttribute(getRootLayout_Name(), ecorePackage.getEString(), "name", null, 0, 1, RootLayout.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

    initEClass(baseLayoutEClass, BaseLayout.class, "BaseLayout", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
    initEAttribute(getBaseLayout_LayoutStyle(), this.getLayoutStyle(), "layoutStyle", null, 0, 1, BaseLayout.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    initEReference(getBaseLayout_Elements(), this.getUIElement(), null, "elements", null, 0, -1, BaseLayout.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

    initEClass(absoluteLayoutEClass, AbsoluteLayout.class, "AbsoluteLayout", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);

    initEClass(linearLayoutEClass, LinearLayout.class, "LinearLayout", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
    initEAttribute(getLinearLayout_Orientation(), ecorePackage.getEBoolean(), "orientation", null, 0, 1, LinearLayout.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

    initEClass(frameLayoutEClass, FrameLayout.class, "FrameLayout", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);

    initEClass(relativeLayoutEClass, RelativeLayout.class, "RelativeLayout", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);

    initEClass(widgetEClass, Widget.class, "Widget", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
    initEAttribute(getWidget_Name(), ecorePackage.getEString(), "name", null, 0, 1, Widget.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    initEAttribute(getWidget_LayoutStyle(), this.getLayoutStyle(), "layoutStyle", null, 0, 1, Widget.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

    initEClass(textViewEClass, TextView.class, "TextView", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
    initEAttribute(getTextView_Text(), ecorePackage.getEString(), "text", null, 0, 1, TextView.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

    initEClass(editTextEClass, EditText.class, "EditText", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
    initEAttribute(getEditText_Text(), ecorePackage.getEString(), "text", null, 0, 1, EditText.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

    initEClass(buttonEClass, Button.class, "Button", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
    initEAttribute(getButton_Text(), ecorePackage.getEString(), "text", null, 0, 1, Button.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

    initEClass(listViewEClass, ListView.class, "ListView", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
    initEReference(getListView_Entries(), theAndroResDslPackage.getArrayResource(), null, "entries", null, 0, 1, ListView.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    initEReference(getListView_Layout(), this.getLayout(), null, "layout", null, 0, 1, ListView.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

    initEClass(spinnerEClass, Spinner.class, "Spinner", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);

    initEClass(checkBoxEClass, CheckBox.class, "CheckBox", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
    initEAttribute(getCheckBox_Text(), ecorePackage.getEString(), "text", null, 0, 1, CheckBox.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    initEReference(getCheckBox_Entries(), theAndroResDslPackage.getArrayResource(), null, "entries", null, 0, 1, CheckBox.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

    initEClass(radioGroupEClass, RadioGroup.class, "RadioGroup", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
    initEAttribute(getRadioGroup_Orientation(), ecorePackage.getEBoolean(), "orientation", null, 0, 1, RadioGroup.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    initEReference(getRadioGroup_Radiobuttons(), this.getRadioButton(), null, "radiobuttons", null, 0, -1, RadioGroup.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

    initEClass(ratingBarEClass, RatingBar.class, "RatingBar", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
    initEAttribute(getRatingBar_NumStars(), ecorePackage.getEInt(), "numStars", null, 0, 1, RatingBar.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

    initEClass(toggleButtonEClass, ToggleButton.class, "ToggleButton", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
    initEAttribute(getToggleButton_TextOn(), ecorePackage.getEString(), "textOn", null, 0, 1, ToggleButton.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    initEAttribute(getToggleButton_TextOff(), ecorePackage.getEString(), "textOff", null, 0, 1, ToggleButton.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

    initEClass(radioButtonEClass, RadioButton.class, "RadioButton", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
    initEAttribute(getRadioButton_Name(), ecorePackage.getEString(), "name", null, 0, 1, RadioButton.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    initEAttribute(getRadioButton_Text(), ecorePackage.getEString(), "text", null, 0, 1, RadioButton.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    initEAttribute(getRadioButton_LayoutStyle(), this.getLayoutStyle(), "layoutStyle", null, 0, 1, RadioButton.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

    initEClass(preferenceScreenEClass, PreferenceScreen.class, "PreferenceScreen", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
    initEAttribute(getPreferenceScreen_Title(), ecorePackage.getEString(), "title", null, 0, 1, PreferenceScreen.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

    // Initialize enums and add enum literals
    initEEnum(layoutStyleEEnum, LayoutStyle.class, "LayoutStyle");
    addEEnumLiteral(layoutStyleEEnum, LayoutStyle.FILL);
    addEEnumLiteral(layoutStyleEEnum, LayoutStyle.WRAP);
    addEEnumLiteral(layoutStyleEEnum, LayoutStyle.FILL_WRAP);
    addEEnumLiteral(layoutStyleEEnum, LayoutStyle.WRAP_FILL);

    // Create resource
    createResource(eNS_URI);
  }

} //AndroGuiDslPackageImpl
